You need to change QStringList to QList<QObject*>
From
class ComboboxUpdate:public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList comboList READ comboList)
...
}
to
class ComboboxUpdate:public QObject
{
Q_OBJECT
Q_PROPERTY(QList<QObject*> comboList READ comboList)
}
for example you could change your code in this way or add a subclass
class ComboboxUpdate:public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList comboList READ comboList)
Q_PROPERTY(int sqlid READ sqlid WRITE setSqlid NOTIFY sqlidChanged)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
}
and in ComboBox you can use
ComboBox {
id: typeComboBox
model:combomodel.comboList
textRole: "text"
onCurrentIndexChanged: {
var sqlid = typeComboBox.model[typeComboBox.currentIndex].sqlid;
console.log(sqlid);
}
}
I hope that my answer will be helpful for you.